import { PointMultipleRecord } from "@/types/entity/point";
import { GetMemberPointChange } from "@/api/point";
import { InjectionKey } from "vue";
import { PointMultipleChangePropertyMap as PMCPM } from "@/map/point/property-map";

export interface PointContext {
  scenario: Scenario;
  record: PointMultipleRecord;
  dataCollection: (key: string, cb: () => any) => void;
}

export interface PointSingleContext {
  map: (typeof GetMemberPointChange)["map"];
}

export type Scenario = "create" | "check" | "edit";

export const POINT_SINGLE_CONTEXT: InjectionKey<PointSingleContext> = Symbol();

export interface MultipleChangeItem {
  [PMCPM.ItemId]: 1;
  [PMCPM.ItemTitle]: string;
  [PMCPM.NumberOfPeople]: number;
  [PMCPM.ItemPoint]: number;
  [PMCPM.ItemType]: 0 | 1;
}
